
#include "util.h"

void GetClipRect(ClipRect *r, Pos oldP, Pos newP)
{
    r->startX = (oldP.x <= newP.x)? oldP.x: newP.x;
    r->endX = (oldP.x <= newP.x)? newP.x: oldP.x;
    r->startY = (oldP.y <= newP.y)? oldP.y: newP.y;
    r->endY = (oldP.y <= newP.y)? newP.y: oldP.y;
}
